def fun(num): #用来判断num是否是质数
  if(num == 2):
    return True
  if(num == 1):
    return False
  if(num%2==0):
    return False
  if(num >= 3):
    for i in range(3, num//2+1,2):
      if(num%i==0):
        return False
    return True

cnt = 0
#将2019拆分成若干个质数之和
for i in range(2,  100//2+1):
  num1 = i
  num2 = 2019-i

  if fun(num1) and fun(num2):
    # print(True)
    cnt= cnt+1
  else:
    continue

print(cnt)
# print(fun(2),fun(3),fun(11),fun(9))
